package javaidiot;

import java.util.*;

public class View {

    private static final Scanner SN = new Scanner(System.in);

    public static void out(int s) {
        System.out.println(String.valueOf(s));
    }

    public static void out(String s) {
        System.out.println(s);
    }

    public void printArray(String[][] array) {
        String tmp = "";
        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array[i].length; j++) {
                tmp += array[i][j] + ((j < (array[i].length - 1)) ? " : " : "\n");
            }
        }
        out(tmp);
    }

    public static void exception(String ex) {
        if (ex.equals("not integer")) {
            out("...very polite message that given input is definetly not an integer");
        }
        if (ex.endsWith("out of range")) {
            out("...very polite message that given input is definetly incorrect");
        }
        if (ex.endsWith("not float")) {
            out("...very polite message that given input is definetly incorrect");
        }
    }

    public static String askMonth() {
        int a = -1;
        while (a < 0) {
            out("...very polite request to input number");
            try {
                a = SN.nextInt();
            } catch (InputMismatchException ex) {
                exception("not integer");
            }
            if (a < 1 || a > 12) {
                exception("out of range");
                a = -1;
            }
        }
        return (a > 9) ? String.valueOf(a) : String.valueOf("0" + a);
    }

    public static void mainMenu() {
        out("Welcome To Our Main Menu");
        out("Press '0' to EXIT");
        out("Press '1' to Manage Products");
        out("Press '2' to Manage Employees");
        out("Press '3' to Manage Orders");
    }
    public static void manageOrders(){
        out("Welcome To Our Order Management");
        out("Press '0' to return to the main menu");
        out("Press '1' to set employee");
        out("Press '2' to delete order");
        out("Press '3' to get daily statistic");
        out("Press '4' to get monthly statistic");
        out("Press '5' to get annula statistic");
    }
    public static void manageEmployees(){
        out("Welcome To Our Employees Management");
        out("Press '0' to return to the main menu");
        out("Press '1' to add employees");
        out("Press '2' to change employees");
        out("Press '3' to delete employees");
        //out("Press '4' to search employees");
    }
    public static void manageProducts(){
        out("Welcome To Our Products Management");
        out("Press '0' to return to the main menu");
        out("Press '1' to add products");
        out("Press '2' to change products");
        out("Press '3' to delete products");
        //out("Press '4' to search products");
    }
    public static void productSetName(){
       out("Please enter the name of the product");
    }
    public static void productSetPrice(){
        out("Please set the price for the product");
    }
    public static void changeproduct(){
        out("Please enter the id of the product you wish to change");
    }
    public static void productDeleteProduct(){
        out("Please enter the id of the product to delete");
    }
    public static void employeeSetName(){
        out("Please enter the name of the employee");
    }
    public static void employeeSetPhone(){
        out("Please enter the phonenumber of the employee(9 digits)");
    }
    public static void changeemployee(){
        out("Please enter the id of the employee you wish to change");
    }
    public static void empolyeeDeleteemployee(){
        out("Please enter the id of the employee to delete");
    }
    public static void orderSetEmployee_order(){
        out("Please enter the order number");
    }
    public static void orderSetEmployee_employee(){
        out("Please enter the employee id");
    }
    public static void orderDeleteOrder(){
        out("Please enter the id of the order to delete");
    }
    public static void orderGetDaily(){
    }
    public static void orderGetMonthly(){
    }
    public static void orderGetAnnual(){
    }
    
}
